﻿using System;

namespace Torrenter.Common.Objects
{
    [Serializable]
    public class EpisodeDefinition
    {
        public string ShowName { get; set; }

        public int SeasonNumber { get; set; }

        public int EpisodeNumnber { get; set; }

        public string SeasonString
        {
            get
            {
                if (SeasonNumber < 10)
                {
                    return "s0" + SeasonNumber.ToString();
                }
                else
                {
                    return "s" + SeasonNumber.ToString();
                }
            }
        }

        public string EpisodeString
        {
            get
            {
                if (EpisodeNumnber < 10)
                {
                    return "e0" + EpisodeNumnber.ToString();
                }
                else
                {
                    return "e" + EpisodeNumnber.ToString();
                }
            }
        }

        public EpisodeDefinition(string showName,int seasonNumber,int epNumber)
        {
            this.ShowName = showName;
            this.SeasonNumber = seasonNumber;
            this.EpisodeNumnber = epNumber;
        }

        public EpisodeDefinition() { }
    }
}
